<div id="categories" class="box first" style="width:235px;">
  <div class="box-head"> Категории </div>
  <div class="box-body">
    <div id="categoriesContent" class="sideBoxContent">
    
       <ul>
           {% for collection in collections %}
         <li class="{% if forloop.first %}category-top_un{% else %}category-top{% endif %}">
           <span class="top-span">
             <a href="{{collection.url}}" class="{% if forloop.first %}category-top_un{% else %}category-top{% endif %}{% if collection.current? %}active{% endif %}">
               {% if collection.subcollections.size > 0 %}
               <span class="category-subs-parent">{{collection.title}}-></span>
               {% else %}
               {{collection.title}}
               {% endif %}
			</a>
           </span>
           	  </li>
             {% if collection.subcollections.size > 0 and template == 'category' %}
             {% for sub in collection.subcollections %}	
           	 <li class="category-products" style="padding-left:15px">
               <span class="top-span">
			<a href="{{sub.url}}" class="category-products {% if sub.current? %}active{% endif %}">{{sub.title}}</a>
               </span>
		    </li>
             {% endfor %}
             {% endif %}
			 
           {% endfor %}
		 </ul>    
    </div>
  </div>
</div>